![]() |
PBHMoveRenameAsync |
||||
Header: | Files.h | Carbon status: | Supported | |
Moves a file or directory and optionally renames it.
OSErr PBHMoveRenameAsync ( HParmBlkPtr paramBlock );
A pointer to a copyParam variant of the HFS parameter block.
A result code.
The relevant fields of the parameter block are:
On input, a pointer to a completion function.
On output, the result code of the function.
On input, a pointer to the source pathname.
On input, a volume specification for the volume containing the source file or directory.
On input, a pointer to the destination pathname (may be NULL). If ioNewName is NULL, the destination directory is the directory having ID ioNewDirID on the specified volume; if ioNewName is not NULL, the destination directory is the directory having the partial pathname pointed to by ioNewName in the directory having ID ioNewDirID on the specified volume.
On input, a pointer to the file’s new name (may be NULL). This is an optional string to be used in copying the file or directory; if it is not NULL, the moved object is renamed to the name specified in ioCopyName. The string pointed to by ioCopyName must be a filename, not a partial pathname.
On input, the destination directory ID.
On input, the source directory ID.
The PBHMoveRenameAsync function allows you to move (not copy) a file or directory. The source and destination pathnames must point to the same file server volume.
This function is especially useful when you want to copy or move files located on a remote volume, because it allows you to forgo transmitting large amounts of data across a network. This function is used internally by the Finder; most applications do not need to use it.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)